<style lang="less">
	@import '~vux/src/styles/reset.less';
	body,html{
		-webkit-overflow-scrolling: touch;
		background-color: #fbf9fe;
		height: 100%;
		width: 100%;
		overflow-x: hidden;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}
	.__title{
		margin: 0;
		font-weight: 400;
		color: rgba(69,90,100,.6);
		padding: 15px 15px 10px;
	}
	.weui-btn{font-size: 16px!important;}
	.weui-cells{ font-size: 14px!important;}
	.el-message{
		top:10px!important;
		padding: 10px!important;
	}
	.weui-media-box__thumb{
		display: block;
		height:100%;
		width:100%;
	}

	.clr{*zoom:1;clear:both}
	.clr:before,.clr:after{display:block;content:".";height:0!important;line-height:0!important;visibility:hidden}
	.clr:after{clear:both}
	.clr{*zoom:1;}
	.center_box{height: 100%;box-sizing: border-box; width: 100%; overflow-y: auto;}
	.goodsitem_box{
		overflow: hidden;
		padding:4px 0;
		.goodsitem{
			background:#fff;
			margin:4px 2px ;
      border:1px solid #d4d4d4;
      border-radius: 3px;
			.img{
				height:200px;
				img{
					display: block; height:100%; width:100%;
				}
			}
			.text{
				padding:4px;
				.title{
					font-size:12px;
					color:#606266;
					line-height: 19px; height:19px;
					overflow: hidden;
					white-space: nowrap;
					text-overflow: ellipsis;
				}
				.attrs{
					line-break: 19px;
					.price{
						font-family: Arial;
						font-size: 12px;
						color:#F56C6C;
						span{
							font-size: 14px;
						}
					}
				}
				.comment{
					font-size:10px;
					color:#909399;
					span{
						padding-right:5px;
					}
				}
			}
		}
	}
</style>
<template>
	<div id="app" >
		<!--<div class="center_box" :style="istabbar ? 'padding-bottom:53px;' : ''">-->
		<div class="center_box" >
			<router-view></router-view>
		</div>
		<!--<tabbar v-if="istabbar" >-->
			<!--<tabbar-item @click.native="jump('shop_index',0)" >-->
				<!--<b slot="icon" class="iconfont icon-shouye"></b>-->
				<!--<span slot="label">商城首页</span>-->
			<!--</tabbar-item>-->
			<!--<tabbar-item @click.native="jump('shop_goodsclass',1)" >-->
				<!--<b slot="icon" class="iconfont icon-leimupinleifenleileibie2"></b>-->
				<!--<span slot="label">分类</span>-->
			<!--</tabbar-item>-->
			<!--<tabbar-item @click.native="jump('shop_card',2)" >-->
				<!--<b slot="icon" class="iconfont icon-gouwuche2"></b>-->
				<!--<span slot="label">购物车</span>-->
			<!--</tabbar-item>-->
			<!--<tabbar-item @click.native="jump('user_index',3)" >-->
				<!--<b slot="icon" class="iconfont icon-yonghudianji"></b>-->
				<!--<span slot="label">会员中心</span>-->
			<!--</tabbar-item>-->
		</tabbar>

	</div>
</template>

<script>
	import { Tabbar, TabbarItem } from 'vux'
	import cookie from 'js-cookie';
	import { mapState, mapActions, mapMutations } from 'vuex'
	export default {
		name : 'app',
		components:{
			Tabbar,
			TabbarItem
		},
		data(){
			return {
        select:3,
        selectPrev:3,
			}
		},
		computed : {
			istabbar(){
				return this.$route.name != 'shop_goodsinfo'
					&& this.$route.name != 'shop_card'
					&& this.$route.name != 'shop_payment'
					&& this.$route.name != 'shop_address'
					&& this.$route.name != 'shop_updateaddress'
					&& this.$route.name != 'shop_insertaddress'
					&& this.$route.name != 'shop_pay'
					&& this.$route.name != 'login'
					&& this.$route.name != 'register'
			}
		},
    methods:{
      jump(url,idx){
        if(idx==2){
          this.select = this.selectPrev;
        }
        localStorage.setItem('actives', idx);
        this.selectPrev = localStorage.getItem('actives');

        this.$router.push({name:url});
      }
    },
		created(){
			cookie.set('discount',10);
		},
    mounted(){
      localStorage.setItem('actives', 3);
      this.select = localStorage.getItem('actives');
    }
	}
</script>

